package com.it.test;

import com.it.config.MainConfigOfAutowired;
import com.it.services.BookService;
import org.junit.Test;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class IOCTest_Autowired {


    @Test
    public void test1() {
        AnnotationConfigApplicationContext app = new AnnotationConfigApplicationContext(MainConfigOfAutowired.class);
        BookService bean = app.getBean(BookService.class);
        System.out.println(bean);
        app.close();
    }


}
